home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12345 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  40 lines

  1. Newsgroups: comp.lang.c
  2. Path: new-news.sprintlink.net!eskimo!scs
  3. From: scs@eskimo.com (Steve Summit)
  4. Subject: Re: 16bit vs. 32bit
  5. X-Nntp-Posting-Host: eskimo.com
  6. Message-ID: <Dp3EH0.I92@eskimo.com>
  7. Sender: news@eskimo.com (News User Id)
  8. Organization: schmorganization
  9. References: <4iui27$egk@news.netam.net> <DovvHG.3DK@eskimo.com> <315845E6.64FC@oc.com>
  10. Date: Sat, 30 Mar 1996 18:10:12 GMT
  11.  
  12. In article <315845E6.64FC@oc.com>, Larry Weiss <lfw@oc.com> wrote:
  13. > Steve Summit wrote:
  14. >> One of the whole points of using a high-level language is to
  15. >> insulate you from low-level machine implementation details such
  16. >> as the sizes of things in bits.  If you find yourself needing to
  17. >> know the sizes of things in bits, someone screwed up.
  18. >
  19. > How do you know how large your arrays could be without some
  20. > consideration of the executing machine(s), perhaps done by
  21. > inspecting size_t ?
  22.  
  23. Depends on how optimally you're trying to do things.
  24.  
  25. If you're a nutso flaming Standard-thumping language lawyer, you
  26. know that the Standard doesn't guarantee that individual objects
  27. can be larger than 32k, and you just don't ever try to allocate
  28. large, contiguous arrays.  In fact, lists or trees or sparse
  29. arrays or (my latest favorite) lists of "chunks" are almost
  30. always better data structures to use, anyway.
  31.  
  32. If efficiency or sanity (e.g. bitmap graphics processing) demand
  33. large, contiguous arrays, it's true that you start caring more
  34. about exact sizes, but in those cases you're often less portable
  35. or strictly-conforming, anyway (especially if you're trying to
  36. optimize).
  37.  
  38.                     Steve Summit
  39.                     scs@eskimo.com
  40.